package com.alinesno.cloud.base.logger.alarm;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import cn.afterturn.easypoi.exception.excel.ExcelImportException;

/**
 * 测试异常
 * @author WeiXiaoJin
 * @since 2020年1月29日 下午19:45:08
 */
@Component
public class ExceptionErrorJob {

	private static int error = 1 ; 
	
	@Scheduled(cron = "0/10 * * * * ?")
	public void throwJob() {
		switch (error) {
			case 1: throw new ExcelImportException("数据导入错误.") ; 
		}
	}
	
}
